#ifndef _MY_UART_H_
#define _MY_UART_H_


#include "ddl.h"
#include "lpuart.h"
#include "lpm.h"
#include "gpio.h"
#include "sysctrl.h"

// #define RELEASE_VER     1

#define RX_TX_FRAME_LEN     100      ///< 通信帧长度 ，最大通讯长度20个字节




typedef struct 
{
    uint8_t  recv_flag;
    uint8_t  recv_num;      // 接收的个数
    uint8_t  recv_finish_flag;
    uint8_t  recv_timeout_cnt;    
    uint8_t  rx_buff[RX_TX_FRAME_LEN];
    uint8_t  tx_buff[RX_TX_FRAME_LEN];
}UART_PARAM_t;

extern UART_PARAM_t uart_data;

void clear_uart_recv_timeout(void);
void uart_recv_timeout_check(void);
uint8_t get_uart_recv_finish_flag(void);


void my_uart_init(void);

#endif